Machine tools with an automatic tool change function are well known in the art. These are machine tools that perform machining work automatically while various tools are changed, also automatically. In order to mate a desired tool with machine tool spindle in a smooth manner, it is necessary to stop a specified portion of the spindle at a predetermined commanded angular position with a high degree of accuracy. The same is true also in boring-type machine tools in order to insert a boring rod into a hole previously drilled in workpiece. Thus the need to stop a specified portion of a spindle at a predetermined angular position or orientation in accurate fashion is quite common in mechanical machining operations.
It is conventional practice to stop a spindle at a predetermined orientation by using a mechanical control mechanism and pin mechanism. However, the pin, which serves as the stopping member, can be damaged by an externally applied force or by a machine malfunction, and the control mechanism can sustain wear owing to the effects of friction. Such penomena make it impossible to stop the spindle at the predetermined orientation, thereby impeding the smooth changing of tools and the insertion of the boring rod. Avoiding the above usually entails troublesome maintenance and inspection work as well as the frequent replacement of parts.
The present inventors have already proposed a spindle rotation control system which enables a spindle to be stopped at a predetermined orientation with a high accuracy without the use of a mechanical brake and mechanical stopping mechanism, and which permits the spindle to be rotated at a commanded speed. The previously proposed system is illustrated in FIGS. 1 through 4, in which FIG. 1 is a block diagram showing a servo system employed in spindle rotation control, FIGS. 2a and 2b are illustrative views useful in describing spindle orientation, FIG. 3 is a block diagram of a circuit for generating a position deviation signal, and FIG. 4 is a waveform diagram of signals associated with the circuit of FIG. 3.
Referring to FIGS. 1 and 2, there are provided a speed control circuit 1, a DC motor 2, a tachometer generator 3 for generating a voltage in accordance with the rotational speed of the DC motor 2, and an orientation control circuit 4 for producing a voltage in accordance with a deviation between a commanded stopping position and the actual position of a spindle. Numeral 5 denotes a tool mounted on a spindle mechanism 6. The spindle 7 of the spindle mechanism is coupled to the DC motor 2 via a belt 8, although gears may also be used for this purpose. A position coder or a pulse coder 9, such as a rotary encoder adapted to generate a pulse whenever the spindle 7 rotates by a predetermined angle, is connected directly to the spindle 7. Numeral 10 denotes a changeover switch. In FIG. 2, numeral 11 denotes an orientation portion provided on the spindle 7. A tool change cannot be performed smoothly unless the orientation portion 11 comes to rest at a predetermined angular position when the spindle 7 is stopped.
In operation, the movable contact member of the changeover switch 10 is switched over to the contact a when the tool 5 performs a machining operation, so that the speed control circuit 1 receives a command speed signal CV from a command speed signal generating circuit, which is not shown. The speed control circuit 1 also receives from the tachometer generator 3 an analog voltage AV which corresponds to the actual speed of the spindle. The speed control circuit 1 is operable to produce an analog voltage which corresponds to the deviation between the command speed signal CV (an analog voltage) and the actual speed signal AV which, as mentioned above, is an analog voltage. The speed control circuit 1 applies the analog deviation voltage to the DC motor 2 to rotate the motor at the commanded speed. Thus, the speed control circuit 1, DC motor 2, tachometer generator 3 and a feedback line FL form a speed control feedback loop which functions to rotate the DC motor 2 at the commanded speed.
When the machining work is completed and the DC motor is to be stopped, the command speed signal CV is changed over to a value such as zero volt, and the speed of the motor 2 is reduced while applying an electrical brake thereto. Then, immediately before the motor 2 comes to rest, namely at such time that the speed has reached a fairly low level, an orientation command ORCM is applied to the changeover switch 10, so that the movable member of the switch is changed over from the contact a to the contact b.
The orientation control circuit 4 is adapted to produce a rotational position deviation signal RPD, which is an analog voltage, in accordance with the deviation between a commanded stopping position which has been predetermined, and the actual angular position (orientation) of the spindle.
Reference will now be had to FIGS. 3 and 4 to describe the operation of the orientation control circuit 4 for a case where there is but one stopping position for the orientation portion 11 on the spindle 7. The arrangement is such that the signals RTS and PP from position coder 9 are used to produce a one-revolution pulse RPS for each revolution of the spindle 7, and position pulses PPF each one of which is produced whenever the spindle rotates by a predetermined angle, a total of N of these pulses PPF being produced for each single revolution of the spindle 7. The position coder 9 is attached to the spindle 7 in such a manner that the one-revolution pulse RPS is generated at such time that the orientation portion 11 on the spindle has rotated 180.degree. from the commanded stopping position STP, shown in FIG. 2. A counter 41 shown in FIG. 3 is preset to the numerical value N upon the generation of the pulse RPS, and then has this preset value counted down by each position pulse PPF that subsequently arrives. A digital-to-analog converter (referred to as a DA converter hereinafter) 42 converts the output of counter 41 (which output signal represents the content of the counter) into an analog signal DAV which is applied to an analog subtractor 43, the latter producing a difference voltage SV between the analog voltage DAV and a constant voltage V.sub.c. Accordingly, if the voltage V.sub.c is set to one-half the peak value of the analog voltage DAV from the DA converter 42, the difference signal SV will have a sawtooth waveform that crosses the zero level at such time that 180.degree. has been covered by the spindle from the point at which the one-revolution pulse RPS is generated, as shown in FIG. 4. Since the commanded stopping position of the spindle is displaced by exactly 180.degree. from the point at which the pulse RPS is generated, as described above, the orientation portion 11 on the spindle 7 reaches the commanded stopping position at the moment the difference voltage SV crosses the zero level. It should be noted that the difference voltage SV is proportional to the rotational position deviation signal RPD.
When the changeover switch 10 in FIG. 1 is changed over to the contact b, therefore, the speed control circuit 1 delivers a difference voltage between the rotational position deviation signal RPD and the actual speed signal AV, whereby positional servo control is executed to make the rotational position deviation signal RPD approach zero. Thus, the speed control circuit 1, DC motor 2, spindle 7, position coder 9, orientation control circuit 4 and changeover switch 10 form a position control feedback loop. When the orientation portion 11 on the spindle 7 is oriented as shown in FIG. 2(A), the spindle 7 will be rotated counter-clockwise and the orientation portion 11 will stop correctly at the commanded stopping position STP. When the orientation portion 11 is oriented as shown in FIG. 2(B), the spindle will be rotated clockwise and the orientation portion will stop correctly at the commanded stopping position STP.
Thus the previously proposed system rotates the spindle correctly at the commanded speed during rotation, and stops the spindle at the commanded stopping position when the spindle is to be stopped. However, a problem encountered in the foregoing system is that there is a shift in the spindle stopping position which depends upon the direction in which the spindle is rotating. This will now be described in detail with reference to FIG. 5.
FIG. 5 is a waveform diagram which is useful in describing the shift in the spindle stopping position. As stated above, the position coder 9 produces the one-revolution signal RTS each time the spindle makes one complete revolution. Since the signal RTS has a sinusoidal shape, as shown in FIG. 5(A), it is converted into a one-revolution pulse RPS having the shape of a rectangular wave upon comparison with a predetermined slicing level. In order to prevent erroneous operation caused by an external disturbance, the slicing circuit is set in such a manner that the slicing level when the signal RTS is rising differs from the slicing level when the signal RTS is decaying. In other words, the slicing circuit is furnished with a hysteresis characteristic. With the spindle rotating in the forward direction, let V.sub.NU represent the slicing level when the signal RTS is rising, and let V.sub.ND represent the slicing level when signal RTS is decaying, where V.sub.NU &lt;V.sub.ND. With the spindle rotating in the reverse direction, let V.sub.RU denote the slicing level when RTS is rising, and let V.sub.RD denote the slicing level when RTS is decaying, where V.sub.RU &lt;V.sub.RD. The one-revolution pulse RPS therefore will appear as shown in FIG. 5(B) when the spindle is rotating in the forward direction, and as shown in FIG. 5(C) when the spindle is rotating in the reverse direction. In other words, the position of the rectangular pulse during forward rotation differs from that during reverse rotation. This shift in position corresponds to more than one of the position pulses PPF, as shown in FIG. 5(D). With the proposed system described above, the instant at which the numerical value N is preset in counter 41 is the moment t.sub.N at which pulse RTP (FIG. 5(B)) rises during forward rotation, or the moment t.sub.R at which pulse RTP (FIG. 5(C)) decays during reverse rotation. Consequently, the position at which the value N is preset, and which is calculated in terms of the position pulses PPF, differs by more than one pulse, so that the spindle stopping position is not the same for forward and reverse rotation. This obviously makes it impossible to stop the spindle at the commanded position with a high accuracy.